package chixing.day05;

public class ProductTesr {
    public static void main(String[] args) {
        Product[] products = new Product[5];
        products[0] = new Product(1, "电脑", 5000, "电脑");
        products[1] = new Product(2, "鼠标", 20, "鼠标");
        products[2] = new Product(3, "键盘", 500, "键盘");
        products[3] = new Product(4, "鼠标垫", 10, "鼠标垫");
        products[4] = new Product(5, "USB", 10, "USB");
        for (int i = 0; i < products.length; i++) {
            System.out.println(products[i].getProductId() + " " + products[i].getProductName());
        }
        for (int i = 0; i < products.length; i++) {
            if (products[i].getProductPrice() > 300) {
                System.out.println(products[i].getProductName());
            }
        }
    }
}
